#ifndef SINGLETION_HPP
#define SINGLETION_HPP

#include <iostream>

class Singleton
{
  private:
  static Singleton m_instance;
  Singleton(){}

  // C++98
  // Singletion(const Singletion&);
  // Singletion& operator=(const Singletion&);

  // C++11
  // 禁止类拷贝
  Singleton(const Singleton&) = delete;
  // 禁止类赋值
  Singleton& operator=(const Singleton&) = delete;

  public:
  static Singleton* GetInstance()
  {
    return &m_instance;
  }
};
Singleton Singleton::m_instance;

#endif
